package com.tengju.bff.interfaces.shared;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author: 李大仙
 * @date: 2021/5/28 11:02 上午
 */
@Data
@ApiModel(value = "ColumnAttrs", description = "表头样式")
public class ColumnAttrs {

    @ApiModelProperty(value = "表头单元格宽度")
    private Integer width;
    @ApiModelProperty(value = "表头单元格对齐样式")
    private String align;

    private ColumnAttrs() {
    }

    private ColumnAttrs(Integer width, String align) {
        this.width = width;
        this.align = align;
    }

    public static ColumnAttrs of(Integer width, String align) {
        return new ColumnAttrs(width, align);
    }

    public static ColumnAttrs defaultVal() {
        return new ColumnAttrs(170, "center");
    }
}
